<%@ page import="com.ws.q1.conifg.Res" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改用户</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css">
    <script src="${pageContext.request.contextPath}/js/jquery-2.1.0.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
    <style>
        .cus-container {
            width: 1368px;
            margin: 0 auto;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .btn-primary {
            margin-right: 10px;
        }
    </style>
</head>
<body>
<div class="container cus-container">
    <h3 class="text-center">修改用户</h3>

    <form action="${pageContext.request.contextPath}/denglu/update" method="post" enctype="multipart/form-data">
        <input type="hidden" name="id" value="${huixian.id}">
        <div class="form-group">
            <label for="name">用户名：</label>
            <input type="text" class="form-control" id="name" name="name" value="${huixian.name}" placeholder="请输入用户名" required>
        </div>

        <div class="form-group">
            <label for="pass">密码：</label>
            <input type="password" class="form-control" id="pass" name="pass" placeholder="请输入新密码">
        </div>

        <div class="form-group">
            <label for="avatar">头像</label>
            <input type="file" class="form-control-file" id="avatar" name="image">
            <img src="<%=Res.fileUrl%>${huixian.tou}" alt="用户头像" style="width: 100px; height: 100px; border-radius: 50%; margin-top: 10px;">
        </div>

        <div class="text-center">
            <a href="${pageContext.request.contextPath}/denglu/list" class="btn btn-outline-secondary">返回列表</a>
            <button type="submit" class="btn btn-primary btn-lg">保存</button>
        </div>
    </form>
</div>
</body>
</html>
